﻿<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" default-lazy="true" namespace="Cms.Domain" assembly="Cms.Domain">
  <class name="CustomAdminPage" table="cmsCustomAdminPage">
    <cache usage="read-write" />
    <id name="Id" type="System.Int32" unsaved-value="0">
      <column name="ID" />
      <generator class="identity" />
    </id>
    <property name="Name" type="System.String">
      <column name="Name" not-null="true" />
    </property>
    <property name="Filename" type="System.String">
      <column name="Filename" not-null="true" />
    </property>
    <many-to-one class="Site" name="Site">
      <column name="SiteID" not-null="true" />
    </many-to-one>
    <many-to-one class="SourceCode" name="Code" cascade="all">
      <column name="CodeID" />
    </many-to-one>
    <many-to-one class="SourceCode" name="XmlTranslations" cascade="all">
      <column name="XmlTranslationsID" />
    </many-to-one>
    <bag name="AllowedAdministratorGroups" table="cmsAdministratorGroupAllowedPage" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="PageID" />
      </key>
      <many-to-many class="AdministratorGroup">
        <column name="GroupID" />
      </many-to-many>
    </bag>
    <bag name="DeniedAdministratorGroups" table="cmsAdministratorGroupDeniedPage" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="PageID" />
      </key>
      <many-to-many class="AdministratorGroup">
        <column name="GroupID" />
      </many-to-many>
    </bag>
    <property name="ShowInMenu" type="System.Boolean">
      <column name="ShowInMenu" not-null="true" />
    </property>
  </class>
</hibernate-mapping>